var app = getApp();
var util = require('../../../utils/util.js');
var common = require('../../../utils/common.js');
var PageBase = require('../../../common/PageBase.js');
var ajax = require('../../../utils/ajax.js');

Page(common.extendPage(PageBase, {

  data: {
    dataLoaded: false,
    serviceList: []
  },

  onLoad(options) {
    var _self = this;
    var sid = options.id;
    _self._getDetail(sid);
  },


	/**
	 * 获取服务详情
	 * @return {[type]} [description]
	 */
  _getDetail(sid) {

    ajax.G({
      url: 'm=plugins&c=activity&a=detail',
      data: {
        id: sid
      },
      success: (res) => {
        var actInfo = res.data;
        this.setData({
          dataLoaded: true,
          actInfo
        })
      }
    });

  }

}));
